package com.zxc.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zxc.dao.StorageMapper;
import com.zxc.entity.Storage;
import com.zxc.service.StorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class StorageServiceImpl extends ServiceImpl<StorageMapper, Storage> implements StorageService {

    @Autowired
    private StorageMapper storageMapper;

    @Override
    public int selectStorageCount() {
        int count = storageMapper.selectCount(new QueryWrapper<>());
        return count;
    }

    @Override
    public List<Storage> getStorageList(int skipCounts, Integer pageSize) {
        List<Storage> storageList = storageMapper.getStorageList(skipCounts,pageSize);
        return storageList;
    }
}
